import { usePageRequest } from "../../../utils/request";
import dayjs from "../../../utils/day";

Component({
    properties: {},
    data: {},
    methods: {
        onLoad() {
            this.request = new usePageRequest('api/ownerorderpricetotal', {
                pretreatment: data => {
                    data.list = data.list.map(item => {
                        item.time = dayjs.unix(item.live_out_time).format('YYYY-MM-DD')
                        return item
                    })
                    return data
                }
            }, this)
        },
        back() {
            wx.switchTab({
                url: '/pages/home/index/index'
            })
        }
    }
});
